<%@ page import="org.jeecgframework.web.util.StaticValue" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true">
  <div region="center" style="padding:1px;">
  <t:datagrid name="cbsWarehouseList"   checkbox="true" fitColumns="false" title="物流仓库管理" actionUrl="cbsWarehouseController.do?dataGridList" idField="id" fit="true" queryMode="group">
   <t:dgCol title="主键"  field="id"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="物流"  field="logistics"    queryMode="single"  width="120" query="true"></t:dgCol>
   <t:dgCol title="仓库"  field="name"    queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="SLA"  field="slaType" query="true"    queryMode="single"  width="120" dictionary="<%=StaticValue.SLATYPE %>"></t:dgCol>
   <t:dgCol title="目的地城市"  field="territoryname" query="true"    queryMode="single"  width="120"></t:dgCol>
   <%--<t:dgCol title="所在市"  field="shi.territoryName"    queryMode="single"  width="120"></t:dgCol>--%>
   <%--<t:dgCol title="是否推荐"  field="isPriority"  query="true"   queryMode="single"  width="120" dictionary="<%=StaticValue.ISPRIORITY %>"></t:dgCol>--%>
   <t:dgCol title="仓库状态"  field="isClose"  query="true"   queryMode="single"  width="120" dictionary="<%=StaticValue.ISCLOSE %>"></t:dgCol>
   <t:dgCol title="创建人名称"  field="createName"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="创建人登录名称"  field="createBy"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="创建日期"  field="createDate" formatter="yyyy-MM-dd" hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="更新人名称"  field="updateName"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="更新人登录名称"  field="updateBy"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="更新日期"  field="updateDate" formatter="yyyy-MM-dd" hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <%--<t:dgCol title="操作" field="opt" width="100"></t:dgCol>--%>
   <%--<t:dgDelOpt title="删除" url="cbsWarehouseController.do?doDel&id={id}" />--%>
   <t:dgToolBar title="新建" icon="icon-add" funname="addCreateTab" operationCode="warehouseadd"></t:dgToolBar>
   <t:dgToolBar title="修改" icon="icon-edit"  funname="update" operationCode="warehouseedit"></t:dgToolBar>
   <%--<t:dgToolBar title="批量删除"  icon="icon-remove" url="cbsWarehouseController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar>--%>
   <t:dgToolBar title="查看" icon="icon-search" funname="look" operationCode="warehousesearch"></t:dgToolBar>

   <%--<t:dgToolBar title="设为推荐物流" icon="icon-put"  funname="setPriority"></t:dgToolBar>--%>
   <%--<t:dgToolBar title="导出" icon="icon-putout" funname="ExportXls"></t:dgToolBar>--%>
   <%--<t:dgToolBar title="模板下载" icon=" icon-putout" funname="ExportXlsByT"></t:dgToolBar>--%>
  </t:datagrid>
  </div>
 </div>
 <script src = "webpage/com/zybk/com.wuliu/cbsWarehouseList.js"></script>		
 <script type="text/javascript">
 $(document).ready(function(){
 		//给时间控件加上样式
 			$("#cbsWarehouseListtb").find("input[name='createDate']").attr("class","Wdate").attr("style","height:20px;width:90px;").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
 			$("#cbsWarehouseListtb").find("input[name='updateDate']").attr("class","Wdate").attr("style","height:20px;width:90px;").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
     territoryLink("cbsWarehouseList","territoryname",1);
 });
 
//导入
function ImportXls() {
	openuploadwin('Excel导入', 'cbsWarehouseController.do?upload', "cbsWarehouseList");
}

//导出
function ExportXls() {
	JeecgExcelExport("cbsWarehouseController.do?exportXls","cbsWarehouseList");
}

//模板下载
function ExportXlsByT() {
	JeecgExcelExport("cbsWarehouseController.do?exportXlsByT","cbsWarehouseList");
	
}
 function addCreateTab() {
     addOneTab('添加', 'cbsWarehouseController.do?goAdd', '');
 }
 function setPriority() {
     var datas = $("#cbsWarehouseList").datagrid("getSelections");
     if(datas.length != 1){
         tip("请选择一条信息");
         return;
     }
     var setid = datas[0].id;
     $.ajax({
         type:"post",
         dataType:"json",
         url:"cbsWarehouseController.do?setPriority&sid="+setid,
         success:function (data) {
             var map = data.attributes;
             tip(map.code);
             reloadTable();
         }
     })
 }
 function update() {
     var datas = $("#cbsWarehouseList").datagrid("getSelections");
     if(datas.length != 1){
         tip("请选择一条信息");
         return;
     }
     var id = datas[0].id;
     addOneTab("修改","cbsWarehouseController.do?goUpdate&id="+id,"");
 }
 function look() {
     var datas = $("#cbsWarehouseList").datagrid("getSelections");
     if(datas.length != 1){
         tip("请选择一条信息");
         return;
     }
     var id = datas[0].id;
     addOneTab("查看","cbsWarehouseController.do?goLook&id="+id,"");
 }
 </script>